
_schedtest：     文件格式 elf32-i386


Disassembly of section .text:

00000000 <main>:
void busy_computing(){
   fib(30);
}


int main(){
   0:	8d 4c 24 04          	lea    0x4(%esp),%ecx
   4:	83 e4 f0             	and    $0xfffffff0,%esp
   7:	ff 71 fc             	push   -0x4(%ecx)
   a:	55                   	push   %ebp
   b:	89 e5                	mov    %esp,%ebp
   d:	57                   	push   %edi
   e:	56                   	push   %esi
   f:	53                   	push   %ebx
  10:	51                   	push   %ecx
  11:	83 ec 60             	sub    $0x60,%esp

        int i,pid;
        int fd[7][2];
        char c;
        printf(1,"================================\n");
  14:	68 a8 0b 00 00       	push   $0xba8
  19:	6a 01                	push   $0x1
  1b:	e8 60 08 00 00       	call   880 <printf>
        pid=getpid();
  20:	e8 3e 07 00 00       	call   763 <getpid>
        set_priority(pid,1);
  25:	59                   	pop    %ecx
  26:	5e                   	pop    %esi
  27:	6a 01                	push   $0x1
  29:	50                   	push   %eax
        pid=getpid();
  2a:	89 c3                	mov    %eax,%ebx
        printf(1,"Parent (pid=%d, prior=%d)\n",pid,1);
  2c:	8d 75 b0             	lea    -0x50(%ebp),%esi
        set_priority(pid,1);
  2f:	e8 5f 07 00 00       	call   793 <set_priority>
        printf(1,"Parent (pid=%d, prior=%d)\n",pid,1);
  34:	6a 01                	push   $0x1
  36:	53                   	push   %ebx
        for(i=0;i<6;i++){
  37:	31 db                	xor    %ebx,%ebx
        printf(1,"Parent (pid=%d, prior=%d)\n",pid,1);
  39:	68 ef 0b 00 00       	push   $0xbef
  3e:	6a 01                	push   $0x1
  40:	e8 3b 08 00 00       	call   880 <printf>
        for(i=0;i<6;i++){
  45:	83 c4 20             	add    $0x20,%esp
                pipe(fd[i]);
  48:	83 ec 0c             	sub    $0xc,%esp
  4b:	56                   	push   %esi
  4c:	e8 a2 06 00 00       	call   6f3 <pipe>
                if((pid=fork())==0){
  51:	e8 85 06 00 00       	call   6db <fork>
  56:	83 c4 10             	add    $0x10,%esp
  59:	89 c7                	mov    %eax,%edi
  5b:	85 c0                	test   %eax,%eax
  5d:	0f 84 31 01 00 00    	je     194 <main+0x194>
                        close(fd[i][1]);//close write end
                        read(fd[i][0],&c,1);
                        busy_computing();
                        exit();
                }else{
                        close(fd[i][0]);//parent close read end
  63:	83 ec 0c             	sub    $0xc,%esp
  66:	ff 36                	push   (%esi)
        for(i=0;i<6;i++){
  68:	83 c6 08             	add    $0x8,%esi
                        close(fd[i][0]);//parent close read end
  6b:	e8 9b 06 00 00       	call   70b <close>
                        set_priority(pid,i%3+1);
  70:	58                   	pop    %eax
  71:	b8 ab aa aa aa       	mov    $0xaaaaaaab,%eax
  76:	5a                   	pop    %edx
  77:	f7 e3                	mul    %ebx
  79:	89 d0                	mov    %edx,%eax
  7b:	83 e2 fe             	and    $0xfffffffe,%edx
  7e:	d1 e8                	shr    %eax
  80:	01 c2                	add    %eax,%edx
  82:	89 d8                	mov    %ebx,%eax
        for(i=0;i<6;i++){
  84:	83 c3 01             	add    $0x1,%ebx
                        set_priority(pid,i%3+1);
  87:	29 d0                	sub    %edx,%eax
  89:	8d 50 01             	lea    0x1(%eax),%edx
  8c:	52                   	push   %edx
  8d:	57                   	push   %edi
  8e:	89 55 a4             	mov    %edx,-0x5c(%ebp)
  91:	e8 fd 06 00 00       	call   793 <set_priority>
                        printf(1,"Child (pid=%d, prior=%d) created!\n",pid,i%3+1);
  96:	8b 55 a4             	mov    -0x5c(%ebp),%edx
  99:	52                   	push   %edx
  9a:	57                   	push   %edi
  9b:	68 cc 0b 00 00       	push   $0xbcc
  a0:	6a 01                	push   $0x1
  a2:	e8 d9 07 00 00       	call   880 <printf>
        for(i=0;i<6;i++){
  a7:	83 c4 20             	add    $0x20,%esp
  aa:	83 fb 06             	cmp    $0x6,%ebx
  ad:	75 99                	jne    48 <main+0x48>
                }
        }
        pipe(fd[6]);
  af:	83 ec 0c             	sub    $0xc,%esp
  b2:	8d 45 e0             	lea    -0x20(%ebp),%eax
  b5:	50                   	push   %eax
  b6:	e8 38 06 00 00       	call   6f3 <pipe>
        if((pid=fork())==0){//default priority
  bb:	e8 1b 06 00 00       	call   6db <fork>
  c0:	83 c4 10             	add    $0x10,%esp
  c3:	89 c3                	mov    %eax,%ebx
  c5:	85 c0                	test   %eax,%eax
  c7:	0f 84 a8 00 00 00    	je     175 <main+0x175>
                //child
                close(fd[i][1]);//close write end
                busy_computing();
                exit();
        }else{
                close(fd[i][0]);//close read end
  cd:	83 ec 0c             	sub    $0xc,%esp
  d0:	ff 75 e0             	push   -0x20(%ebp)
  d3:	8d 75 ec             	lea    -0x14(%ebp),%esi
  d6:	8d 7d af             	lea    -0x51(%ebp),%edi
  d9:	e8 2d 06 00 00       	call   70b <close>
                printf(1,"Child (pid=%d, prior=%d) created!\n",pid,2);
  de:	6a 02                	push   $0x2
  e0:	53                   	push   %ebx
  e1:	8d 5d b4             	lea    -0x4c(%ebp),%ebx
  e4:	68 cc 0b 00 00       	push   $0xbcc
  e9:	6a 01                	push   $0x1
  eb:	e8 90 07 00 00       	call   880 <printf>
        }
        printf(1,"================================\n");
  f0:	83 c4 18             	add    $0x18,%esp
  f3:	68 a8 0b 00 00       	push   $0xba8
  f8:	6a 01                	push   $0x1
  fa:	e8 81 07 00 00       	call   880 <printf>
        enable_sched_display(1);
  ff:	c7 04 24 01 00 00 00 	movl   $0x1,(%esp)
 106:	e8 90 06 00 00       	call   79b <enable_sched_display>
        //parent wake up all children
        for(i=0;i<7;i++){
 10b:	83 c4 10             	add    $0x10,%esp
 10e:	66 90                	xchg   %ax,%ax
        c='a';
        write(fd[i][1],&c,1);
 110:	83 ec 04             	sub    $0x4,%esp
        c='a';
 113:	c6 45 af 61          	movb   $0x61,-0x51(%ebp)
        for(i=0;i<7;i++){
 117:	83 c3 08             	add    $0x8,%ebx
        write(fd[i][1],&c,1);
 11a:	6a 01                	push   $0x1
 11c:	57                   	push   %edi
 11d:	ff 73 f8             	push   -0x8(%ebx)
 120:	e8 de 05 00 00       	call   703 <write>
        close(fd[i][1]);
 125:	59                   	pop    %ecx
 126:	ff 73 f8             	push   -0x8(%ebx)
 129:	e8 dd 05 00 00       	call   70b <close>
        for(i=0;i<7;i++){
 12e:	83 c4 10             	add    $0x10,%esp
 131:	39 f3                	cmp    %esi,%ebx
 133:	75 db                	jne    110 <main+0x110>
        }


        for(i=0;i<7;i++)
                wait();
 135:	e8 b1 05 00 00       	call   6eb <wait>
 13a:	e8 ac 05 00 00       	call   6eb <wait>
 13f:	e8 a7 05 00 00       	call   6eb <wait>
 144:	e8 a2 05 00 00       	call   6eb <wait>
 149:	e8 9d 05 00 00       	call   6eb <wait>
 14e:	e8 98 05 00 00       	call   6eb <wait>
 153:	e8 93 05 00 00       	call   6eb <wait>
        enable_sched_display(0);
 158:	83 ec 0c             	sub    $0xc,%esp
 15b:	6a 00                	push   $0x0
 15d:	e8 39 06 00 00       	call   79b <enable_sched_display>
        printf(1,"\n");
 162:	58                   	pop    %eax
 163:	5a                   	pop    %edx
 164:	68 08 0c 00 00       	push   $0xc08
 169:	6a 01                	push   $0x1
 16b:	e8 10 07 00 00       	call   880 <printf>
        exit();
 170:	e8 6e 05 00 00       	call   6e3 <exit>
                close(fd[i][1]);//close write end
 175:	83 ec 0c             	sub    $0xc,%esp
 178:	ff 75 e4             	push   -0x1c(%ebp)
 17b:	e8 8b 05 00 00       	call   70b <close>
   fib(30);
 180:	c7 04 24 1e 00 00 00 	movl   $0x1e,(%esp)
 187:	e8 44 00 00 00       	call   1d0 <fib>
 18c:	83 c4 10             	add    $0x10,%esp
                exit();
 18f:	e8 4f 05 00 00       	call   6e3 <exit>
                        close(fd[i][1]);//close write end
 194:	83 ec 0c             	sub    $0xc,%esp
 197:	ff 74 dd b4          	push   -0x4c(%ebp,%ebx,8)
 19b:	e8 6b 05 00 00       	call   70b <close>
                        read(fd[i][0],&c,1);
 1a0:	83 c4 0c             	add    $0xc,%esp
 1a3:	8d 45 af             	lea    -0x51(%ebp),%eax
 1a6:	6a 01                	push   $0x1
 1a8:	50                   	push   %eax
 1a9:	ff 74 dd b0          	push   -0x50(%ebp,%ebx,8)
 1ad:	e8 49 05 00 00       	call   6fb <read>
   fib(30);
 1b2:	c7 04 24 1e 00 00 00 	movl   $0x1e,(%esp)
 1b9:	e8 12 00 00 00       	call   1d0 <fib>
 1be:	83 c4 10             	add    $0x10,%esp
                        exit();
 1c1:	e8 1d 05 00 00       	call   6e3 <exit>
 1c6:	66 90                	xchg   %ax,%ax
 1c8:	66 90                	xchg   %ax,%ax
 1ca:	66 90                	xchg   %ax,%ax
 1cc:	66 90                	xchg   %ax,%ax
 1ce:	66 90                	xchg   %ax,%ax

000001d0 <fib>:
int fib(int i){
 1d0:	55                   	push   %ebp
 1d1:	89 e5                	mov    %esp,%ebp
 1d3:	57                   	push   %edi
 1d4:	56                   	push   %esi
 1d5:	53                   	push   %ebx
 1d6:	83 ec 6c             	sub    $0x6c,%esp
 if(i<=1)return i;
 1d9:	83 7d 08 01          	cmpl   $0x1,0x8(%ebp)
 1dd:	0f 8e 0e 02 00 00    	jle    3f1 <fib+0x221>
 1e3:	8b 45 08             	mov    0x8(%ebp),%eax
 1e6:	8b 55 08             	mov    0x8(%ebp),%edx
 1e9:	c7 45 ac 00 00 00 00 	movl   $0x0,-0x54(%ebp)
 1f0:	83 e8 03             	sub    $0x3,%eax
 1f3:	89 45 b0             	mov    %eax,-0x50(%ebp)
 1f6:	83 fa 02             	cmp    $0x2,%edx
 1f9:	0f 84 4a 02 00 00    	je     449 <fib+0x279>
 1ff:	8d 42 fe             	lea    -0x2(%edx),%eax
 202:	83 ea 04             	sub    $0x4,%edx
 205:	c7 45 a8 00 00 00 00 	movl   $0x0,-0x58(%ebp)
 20c:	89 45 9c             	mov    %eax,-0x64(%ebp)
 20f:	89 45 bc             	mov    %eax,-0x44(%ebp)
 212:	8b 45 b0             	mov    -0x50(%ebp),%eax
 215:	83 e0 fe             	and    $0xfffffffe,%eax
 218:	29 c2                	sub    %eax,%edx
 21a:	89 55 90             	mov    %edx,-0x70(%ebp)
 return fib(i-1)+fib(i-2);
 21d:	8b 55 bc             	mov    -0x44(%ebp),%edx
 if(i<=1)return i;
 220:	c7 45 a4 00 00 00 00 	movl   $0x0,-0x5c(%ebp)
 227:	8d 42 fd             	lea    -0x3(%edx),%eax
 22a:	89 45 b8             	mov    %eax,-0x48(%ebp)
 22d:	83 fa 01             	cmp    $0x1,%edx
 230:	0f 84 09 02 00 00    	je     43f <fib+0x26f>
 236:	83 fa 02             	cmp    $0x2,%edx
 239:	0f 84 ef 01 00 00    	je     42e <fib+0x25e>
 23f:	8d 42 fe             	lea    -0x2(%edx),%eax
 242:	83 ea 04             	sub    $0x4,%edx
 245:	c7 45 a0 00 00 00 00 	movl   $0x0,-0x60(%ebp)
 24c:	89 45 98             	mov    %eax,-0x68(%ebp)
 24f:	89 45 b4             	mov    %eax,-0x4c(%ebp)
 252:	8b 45 b8             	mov    -0x48(%ebp),%eax
 255:	83 e0 fe             	and    $0xfffffffe,%eax
 258:	29 c2                	sub    %eax,%edx
 25a:	89 55 94             	mov    %edx,-0x6c(%ebp)
 return fib(i-1)+fib(i-2);
 25d:	8b 4d b4             	mov    -0x4c(%ebp),%ecx
 if(i<=1)return i;
 260:	c7 45 d4 00 00 00 00 	movl   $0x0,-0x2c(%ebp)
 267:	8d 41 fd             	lea    -0x3(%ecx),%eax
 26a:	89 45 e4             	mov    %eax,-0x1c(%ebp)
 26d:	83 f9 01             	cmp    $0x1,%ecx
 270:	0f 84 ae 01 00 00    	je     424 <fib+0x254>
 276:	83 f9 02             	cmp    $0x2,%ecx
 279:	0f 84 9b 01 00 00    	je     41a <fib+0x24a>
 27f:	8b 45 e4             	mov    -0x1c(%ebp),%eax
 282:	8d 51 fa             	lea    -0x6(%ecx),%edx
 285:	c7 45 e0 00 00 00 00 	movl   $0x0,-0x20(%ebp)
 28c:	8d 71 fc             	lea    -0x4(%ecx),%esi
 28f:	89 4d c8             	mov    %ecx,-0x38(%ebp)
 292:	89 f1                	mov    %esi,%ecx
 294:	83 e0 fe             	and    $0xfffffffe,%eax
 297:	29 c2                	sub    %eax,%edx
 299:	89 55 c0             	mov    %edx,-0x40(%ebp)
 return fib(i-1)+fib(i-2);
 29c:	8d 51 02             	lea    0x2(%ecx),%edx
 if(i<=1)return i;
 29f:	83 f9 ff             	cmp    $0xffffffff,%ecx
 2a2:	0f 84 9b 00 00 00    	je     343 <fib+0x173>
 2a8:	8d 41 ff             	lea    -0x1(%ecx),%eax
 2ab:	89 4d d0             	mov    %ecx,-0x30(%ebp)
 2ae:	89 45 dc             	mov    %eax,-0x24(%ebp)
 2b1:	c7 45 d8 00 00 00 00 	movl   $0x0,-0x28(%ebp)
 2b8:	89 4d c4             	mov    %ecx,-0x3c(%ebp)
 2bb:	83 fa 02             	cmp    $0x2,%edx
 2be:	0f 84 3c 01 00 00    	je     400 <fib+0x230>
 2c4:	8b 45 dc             	mov    -0x24(%ebp),%eax
 2c7:	8d 4a fc             	lea    -0x4(%edx),%ecx
 2ca:	8b 5d d0             	mov    -0x30(%ebp),%ebx
 2cd:	31 ff                	xor    %edi,%edi
 2cf:	83 e0 fe             	and    $0xfffffffe,%eax
 2d2:	29 c1                	sub    %eax,%ecx
 2d4:	89 4d cc             	mov    %ecx,-0x34(%ebp)
 return fib(i-1)+fib(i-2);
 2d7:	89 de                	mov    %ebx,%esi
 if(i<=1)return i;
 2d9:	31 c9                	xor    %ecx,%ecx
 2db:	83 fb 01             	cmp    $0x1,%ebx
 2de:	0f 84 2c 01 00 00    	je     410 <fib+0x240>
 return fib(i-1)+fib(i-2);
 2e4:	83 ec 0c             	sub    $0xc,%esp
 2e7:	8d 46 ff             	lea    -0x1(%esi),%eax
 2ea:	89 55 88             	mov    %edx,-0x78(%ebp)
 2ed:	83 ee 02             	sub    $0x2,%esi
 2f0:	50                   	push   %eax
 2f1:	89 4d 8c             	mov    %ecx,-0x74(%ebp)
 2f4:	e8 d7 fe ff ff       	call   1d0 <fib>
 2f9:	8b 4d 8c             	mov    -0x74(%ebp),%ecx
 2fc:	83 c4 10             	add    $0x10,%esp
 if(i<=1)return i;
 2ff:	8b 55 88             	mov    -0x78(%ebp),%edx
 302:	01 c1                	add    %eax,%ecx
 304:	83 fe 01             	cmp    $0x1,%esi
 307:	7f db                	jg     2e4 <fib+0x114>
 309:	8d 43 fe             	lea    -0x2(%ebx),%eax
 return fib(i-1)+fib(i-2);
 30c:	83 e3 01             	and    $0x1,%ebx
 30f:	8d 34 0b             	lea    (%ebx,%ecx,1),%esi
 if(i<=1)return i;
 312:	01 f7                	add    %esi,%edi
 314:	89 c3                	mov    %eax,%ebx
 316:	39 45 cc             	cmp    %eax,-0x34(%ebp)
 319:	75 bc                	jne    2d7 <fib+0x107>
 return fib(i-1)+fib(i-2);
 31b:	8b 45 dc             	mov    -0x24(%ebp),%eax
 31e:	83 e0 01             	and    $0x1,%eax
 321:	01 f8                	add    %edi,%eax
 323:	83 ea 02             	sub    $0x2,%edx
 326:	01 45 d8             	add    %eax,-0x28(%ebp)
 if(i<=1)return i;
 329:	83 6d d0 02          	subl   $0x2,-0x30(%ebp)
 32d:	83 6d dc 02          	subl   $0x2,-0x24(%ebp)
 331:	83 fa 01             	cmp    $0x1,%edx
 334:	7f 85                	jg     2bb <fib+0xeb>
 return fib(i-1)+fib(i-2);
 336:	8b 4d c4             	mov    -0x3c(%ebp),%ecx
 339:	8b 55 d8             	mov    -0x28(%ebp),%edx
 33c:	89 c8                	mov    %ecx,%eax
 33e:	83 e0 01             	and    $0x1,%eax
 341:	01 c2                	add    %eax,%edx
 if(i<=1)return i;
 343:	01 55 e0             	add    %edx,-0x20(%ebp)
 346:	83 e9 02             	sub    $0x2,%ecx
 349:	39 4d c0             	cmp    %ecx,-0x40(%ebp)
 34c:	0f 85 4a ff ff ff    	jne    29c <fib+0xcc>
 return fib(i-1)+fib(i-2);
 352:	8b 45 e4             	mov    -0x1c(%ebp),%eax
 355:	8b 4d c8             	mov    -0x38(%ebp),%ecx
 358:	83 e0 01             	and    $0x1,%eax
 35b:	03 45 e0             	add    -0x20(%ebp),%eax
 35e:	83 e9 02             	sub    $0x2,%ecx
 361:	01 45 d4             	add    %eax,-0x2c(%ebp)
 if(i<=1)return i;
 364:	83 6d e4 02          	subl   $0x2,-0x1c(%ebp)
 368:	83 f9 01             	cmp    $0x1,%ecx
 36b:	0f 8f 05 ff ff ff    	jg     276 <fib+0xa6>
 371:	8b 5d b4             	mov    -0x4c(%ebp),%ebx
 374:	8b 4d d4             	mov    -0x2c(%ebp),%ecx
 377:	8d 43 fe             	lea    -0x2(%ebx),%eax
 return fib(i-1)+fib(i-2);
 37a:	83 e3 01             	and    $0x1,%ebx
 37d:	01 d9                	add    %ebx,%ecx
 if(i<=1)return i;
 37f:	01 4d a0             	add    %ecx,-0x60(%ebp)
 382:	89 45 b4             	mov    %eax,-0x4c(%ebp)
 385:	39 45 94             	cmp    %eax,-0x6c(%ebp)
 388:	0f 85 cf fe ff ff    	jne    25d <fib+0x8d>
 return fib(i-1)+fib(i-2);
 38e:	8b 45 b8             	mov    -0x48(%ebp),%eax
 391:	83 e0 01             	and    $0x1,%eax
 394:	03 45 a0             	add    -0x60(%ebp),%eax
 397:	8b 55 98             	mov    -0x68(%ebp),%edx
 39a:	01 45 a4             	add    %eax,-0x5c(%ebp)
 if(i<=1)return i;
 39d:	83 6d b8 02          	subl   $0x2,-0x48(%ebp)
 3a1:	83 fa 01             	cmp    $0x1,%edx
 3a4:	0f 8f 8c fe ff ff    	jg     236 <fib+0x66>
 3aa:	8b 75 bc             	mov    -0x44(%ebp),%esi
 3ad:	8b 55 a4             	mov    -0x5c(%ebp),%edx
 3b0:	8d 46 fe             	lea    -0x2(%esi),%eax
 return fib(i-1)+fib(i-2);
 3b3:	83 e6 01             	and    $0x1,%esi
 3b6:	01 f2                	add    %esi,%edx
 if(i<=1)return i;
 3b8:	8b 5d 90             	mov    -0x70(%ebp),%ebx
 3bb:	01 55 a8             	add    %edx,-0x58(%ebp)
 3be:	89 45 bc             	mov    %eax,-0x44(%ebp)
 3c1:	39 d8                	cmp    %ebx,%eax
 3c3:	0f 85 54 fe ff ff    	jne    21d <fib+0x4d>
 return fib(i-1)+fib(i-2);
 3c9:	8b 45 b0             	mov    -0x50(%ebp),%eax
 3cc:	83 e0 01             	and    $0x1,%eax
 3cf:	03 45 a8             	add    -0x58(%ebp),%eax
 3d2:	8b 55 9c             	mov    -0x64(%ebp),%edx
 3d5:	01 45 ac             	add    %eax,-0x54(%ebp)
 if(i<=1)return i;
 3d8:	83 6d b0 02          	subl   $0x2,-0x50(%ebp)
 3dc:	83 fa 01             	cmp    $0x1,%edx
 3df:	0f 8f 11 fe ff ff    	jg     1f6 <fib+0x26>
 return fib(i-1)+fib(i-2);
 3e5:	8b 45 08             	mov    0x8(%ebp),%eax
 3e8:	83 e0 01             	and    $0x1,%eax
 3eb:	03 45 ac             	add    -0x54(%ebp),%eax
 3ee:	89 45 08             	mov    %eax,0x8(%ebp)
}
 3f1:	8b 45 08             	mov    0x8(%ebp),%eax
 3f4:	8d 65 f4             	lea    -0xc(%ebp),%esp
 3f7:	5b                   	pop    %ebx
 3f8:	5e                   	pop    %esi
 3f9:	5f                   	pop    %edi
 3fa:	5d                   	pop    %ebp
 3fb:	c3                   	ret    
 3fc:	8d 74 26 00          	lea    0x0(%esi,%eiz,1),%esi
 if(i<=1)return i;
 400:	b8 01 00 00 00       	mov    $0x1,%eax
 405:	e9 19 ff ff ff       	jmp    323 <fib+0x153>
 40a:	8d b6 00 00 00 00    	lea    0x0(%esi),%esi
 410:	b8 ff ff ff ff       	mov    $0xffffffff,%eax
 415:	e9 f8 fe ff ff       	jmp    312 <fib+0x142>
 41a:	b8 01 00 00 00       	mov    $0x1,%eax
 41f:	e9 3a ff ff ff       	jmp    35e <fib+0x18e>
 424:	b8 ff ff ff ff       	mov    $0xffffffff,%eax
 429:	e9 51 ff ff ff       	jmp    37f <fib+0x1af>
 42e:	c7 45 98 00 00 00 00 	movl   $0x0,-0x68(%ebp)
 435:	b8 01 00 00 00       	mov    $0x1,%eax
 43a:	e9 58 ff ff ff       	jmp    397 <fib+0x1c7>
 43f:	b8 ff ff ff ff       	mov    $0xffffffff,%eax
 444:	e9 6f ff ff ff       	jmp    3b8 <fib+0x1e8>
 449:	c7 45 9c 00 00 00 00 	movl   $0x0,-0x64(%ebp)
 450:	b8 01 00 00 00       	mov    $0x1,%eax
 455:	e9 78 ff ff ff       	jmp    3d2 <fib+0x202>
 45a:	8d b6 00 00 00 00    	lea    0x0(%esi),%esi

00000460 <busy_computing>:
void busy_computing(){
 460:	55                   	push   %ebp
 461:	89 e5                	mov    %esp,%ebp
 463:	53                   	push   %ebx
 464:	bb 1d 00 00 00       	mov    $0x1d,%ebx
 469:	83 ec 04             	sub    $0x4,%esp
 return fib(i-1)+fib(i-2);
 46c:	83 ec 0c             	sub    $0xc,%esp
 46f:	53                   	push   %ebx
 if(i<=1)return i;
 470:	83 eb 02             	sub    $0x2,%ebx
 return fib(i-1)+fib(i-2);
 473:	e8 58 fd ff ff       	call   1d0 <fib>
 478:	83 c4 10             	add    $0x10,%esp
 if(i<=1)return i;
 47b:	83 fb ff             	cmp    $0xffffffff,%ebx
 47e:	75 ec                	jne    46c <busy_computing+0xc>
}
 480:	8b 5d fc             	mov    -0x4(%ebp),%ebx
 483:	c9                   	leave  
 484:	c3                   	ret    
 485:	66 90                	xchg   %ax,%ax
 487:	66 90                	xchg   %ax,%ax
 489:	66 90                	xchg   %ax,%ax
 48b:	66 90                	xchg   %ax,%ax
 48d:	66 90                	xchg   %ax,%ax
 48f:	90                   	nop

00000490 <strcpy>:
#include "user.h"
#include "x86.h"

char*
strcpy(char *s, char *t)
{
 490:	55                   	push   %ebp
  char *os;

  os = s;
  while((*s++ = *t++) != 0)
 491:	31 c0                	xor    %eax,%eax
{
 493:	89 e5                	mov    %esp,%ebp
 495:	53                   	push   %ebx
 496:	8b 4d 08             	mov    0x8(%ebp),%ecx
 499:	8b 5d 0c             	mov    0xc(%ebp),%ebx
 49c:	8d 74 26 00          	lea    0x0(%esi,%eiz,1),%esi
  while((*s++ = *t++) != 0)
 4a0:	0f b6 14 03          	movzbl (%ebx,%eax,1),%edx
 4a4:	88 14 01             	mov    %dl,(%ecx,%eax,1)
 4a7:	83 c0 01             	add    $0x1,%eax
 4aa:	84 d2                	test   %dl,%dl
 4ac:	75 f2                	jne    4a0 <strcpy+0x10>
    ;
  return os;
}
 4ae:	8b 5d fc             	mov    -0x4(%ebp),%ebx
 4b1:	89 c8                	mov    %ecx,%eax
 4b3:	c9                   	leave  
 4b4:	c3                   	ret    
 4b5:	8d b4 26 00 00 00 00 	lea    0x0(%esi,%eiz,1),%esi
 4bc:	8d 74 26 00          	lea    0x0(%esi,%eiz,1),%esi

000004c0 <strcmp>:

int
strcmp(const char *p, const char *q)
{
 4c0:	55                   	push   %ebp
 4c1:	89 e5                	mov    %esp,%ebp
 4c3:	53                   	push   %ebx
 4c4:	8b 55 08             	mov    0x8(%ebp),%edx
 4c7:	8b 4d 0c             	mov    0xc(%ebp),%ecx
  while(*p && *p == *q)
 4ca:	0f b6 02             	movzbl (%edx),%eax
 4cd:	84 c0                	test   %al,%al
 4cf:	75 17                	jne    4e8 <strcmp+0x28>
 4d1:	eb 3a                	jmp    50d <strcmp+0x4d>
 4d3:	8d 74 26 00          	lea    0x0(%esi,%eiz,1),%esi
 4d7:	90                   	nop
 4d8:	0f b6 42 01          	movzbl 0x1(%edx),%eax
    p++, q++;
 4dc:	83 c2 01             	add    $0x1,%edx
 4df:	8d 59 01             	lea    0x1(%ecx),%ebx
  while(*p && *p == *q)
 4e2:	84 c0                	test   %al,%al
 4e4:	74 1a                	je     500 <strcmp+0x40>
    p++, q++;
 4e6:	89 d9                	mov    %ebx,%ecx
  while(*p && *p == *q)
 4e8:	0f b6 19             	movzbl (%ecx),%ebx
 4eb:	38 c3                	cmp    %al,%bl
 4ed:	74 e9                	je     4d8 <strcmp+0x18>
  return (uchar)*p - (uchar)*q;
 4ef:	29 d8                	sub    %ebx,%eax
}
 4f1:	8b 5d fc             	mov    -0x4(%ebp),%ebx
 4f4:	c9                   	leave  
 4f5:	c3                   	ret    
 4f6:	8d b4 26 00 00 00 00 	lea    0x0(%esi,%eiz,1),%esi
 4fd:	8d 76 00             	lea    0x0(%esi),%esi
  return (uchar)*p - (uchar)*q;
 500:	0f b6 59 01          	movzbl 0x1(%ecx),%ebx
 504:	31 c0                	xor    %eax,%eax
 506:	29 d8                	sub    %ebx,%eax
}
 508:	8b 5d fc             	mov    -0x4(%ebp),%ebx
 50b:	c9                   	leave  
 50c:	c3                   	ret    
  return (uchar)*p - (uchar)*q;
 50d:	0f b6 19             	movzbl (%ecx),%ebx
 510:	31 c0                	xor    %eax,%eax
 512:	eb db                	jmp    4ef <strcmp+0x2f>
 514:	8d b4 26 00 00 00 00 	lea    0x0(%esi,%eiz,1),%esi
 51b:	8d 74 26 00          	lea    0x0(%esi,%eiz,1),%esi
 51f:	90                   	nop

00000520 <strlen>:

uint
strlen(char *s)
{
 520:	55                   	push   %ebp
 521:	89 e5                	mov    %esp,%ebp
 523:	8b 55 08             	mov    0x8(%ebp),%edx
  int n;

  for(n = 0; s[n]; n++)
 526:	80 3a 00             	cmpb   $0x0,(%edx)
 529:	74 15                	je     540 <strlen+0x20>
 52b:	31 c0                	xor    %eax,%eax
 52d:	8d 76 00             	lea    0x0(%esi),%esi
 530:	83 c0 01             	add    $0x1,%eax
 533:	80 3c 02 00          	cmpb   $0x0,(%edx,%eax,1)
 537:	89 c1                	mov    %eax,%ecx
 539:	75 f5                	jne    530 <strlen+0x10>
    ;
  return n;
}
 53b:	89 c8                	mov    %ecx,%eax
 53d:	5d                   	pop    %ebp
 53e:	c3                   	ret    
 53f:	90                   	nop
  for(n = 0; s[n]; n++)
 540:	31 c9                	xor    %ecx,%ecx
}
 542:	5d                   	pop    %ebp
 543:	89 c8                	mov    %ecx,%eax
 545:	c3                   	ret    
 546:	8d b4 26 00 00 00 00 	lea    0x0(%esi,%eiz,1),%esi
 54d:	8d 76 00             	lea    0x0(%esi),%esi

00000550 <memset>:

void*
memset(void *dst, int c, uint n)
{
 550:	55                   	push   %ebp
 551:	89 e5                	mov    %esp,%ebp
 553:	57                   	push   %edi
 554:	8b 55 08             	mov    0x8(%ebp),%edx
}

static inline void
stosb(void *addr, int data, int cnt)
{
  asm volatile("cld; rep stosb" :
 557:	8b 4d 10             	mov    0x10(%ebp),%ecx
 55a:	8b 45 0c             	mov    0xc(%ebp),%eax
 55d:	89 d7                	mov    %edx,%edi
 55f:	fc                   	cld    
 560:	f3 aa                	rep stos %al,%es:(%edi)
  stosb(dst, c, n);
  return dst;
}
 562:	8b 7d fc             	mov    -0x4(%ebp),%edi
 565:	89 d0                	mov    %edx,%eax
 567:	c9                   	leave  
 568:	c3                   	ret    
 569:	8d b4 26 00 00 00 00 	lea    0x0(%esi,%eiz,1),%esi

00000570 <strchr>:

char*
strchr(const char *s, char c)
{
 570:	55                   	push   %ebp
 571:	89 e5                	mov    %esp,%ebp
 573:	8b 45 08             	mov    0x8(%ebp),%eax
 576:	0f b6 4d 0c          	movzbl 0xc(%ebp),%ecx
  for(; *s; s++)
 57a:	0f b6 10             	movzbl (%eax),%edx
 57d:	84 d2                	test   %dl,%dl
 57f:	75 12                	jne    593 <strchr+0x23>
 581:	eb 1d                	jmp    5a0 <strchr+0x30>
 583:	8d 74 26 00          	lea    0x0(%esi,%eiz,1),%esi
 587:	90                   	nop
 588:	0f b6 50 01          	movzbl 0x1(%eax),%edx
 58c:	83 c0 01             	add    $0x1,%eax
 58f:	84 d2                	test   %dl,%dl
 591:	74 0d                	je     5a0 <strchr+0x30>
    if(*s == c)
 593:	38 d1                	cmp    %dl,%cl
 595:	75 f1                	jne    588 <strchr+0x18>
      return (char*)s;
  return 0;
}
 597:	5d                   	pop    %ebp
 598:	c3                   	ret    
 599:	8d b4 26 00 00 00 00 	lea    0x0(%esi,%eiz,1),%esi
  return 0;
 5a0:	31 c0                	xor    %eax,%eax
}
 5a2:	5d                   	pop    %ebp
 5a3:	c3                   	ret    
 5a4:	8d b4 26 00 00 00 00 	lea    0x0(%esi,%eiz,1),%esi
 5ab:	8d 74 26 00          	lea    0x0(%esi,%eiz,1),%esi
 5af:	90                   	nop

000005b0 <gets>:

char*
gets(char *buf, int max)
{
 5b0:	55                   	push   %ebp
 5b1:	89 e5                	mov    %esp,%ebp
 5b3:	57                   	push   %edi
 5b4:	56                   	push   %esi
  int i, cc;
  char c;

  for(i=0; i+1 < max; ){
    cc = read(0, &c, 1);
 5b5:	8d 7d e7             	lea    -0x19(%ebp),%edi
{
 5b8:	53                   	push   %ebx
  for(i=0; i+1 < max; ){
 5b9:	31 db                	xor    %ebx,%ebx
{
 5bb:	83 ec 1c             	sub    $0x1c,%esp
  for(i=0; i+1 < max; ){
 5be:	eb 27                	jmp    5e7 <gets+0x37>
    cc = read(0, &c, 1);
 5c0:	83 ec 04             	sub    $0x4,%esp
 5c3:	6a 01                	push   $0x1
 5c5:	57                   	push   %edi
 5c6:	6a 00                	push   $0x0
 5c8:	e8 2e 01 00 00       	call   6fb <read>
    if(cc < 1)
 5cd:	83 c4 10             	add    $0x10,%esp
 5d0:	85 c0                	test   %eax,%eax
 5d2:	7e 1d                	jle    5f1 <gets+0x41>
      break;
    buf[i++] = c;
 5d4:	0f b6 45 e7          	movzbl -0x19(%ebp),%eax
 5d8:	8b 55 08             	mov    0x8(%ebp),%edx
 5db:	88 44 1a ff          	mov    %al,-0x1(%edx,%ebx,1)
    if(c == '\n' || c == '\r')
 5df:	3c 0a                	cmp    $0xa,%al
 5e1:	74 1d                	je     600 <gets+0x50>
 5e3:	3c 0d                	cmp    $0xd,%al
 5e5:	74 19                	je     600 <gets+0x50>
  for(i=0; i+1 < max; ){
 5e7:	89 de                	mov    %ebx,%esi
 5e9:	83 c3 01             	add    $0x1,%ebx
 5ec:	3b 5d 0c             	cmp    0xc(%ebp),%ebx
 5ef:	7c cf                	jl     5c0 <gets+0x10>
      break;
  }
  buf[i] = '\0';
 5f1:	8b 45 08             	mov    0x8(%ebp),%eax
 5f4:	c6 04 30 00          	movb   $0x0,(%eax,%esi,1)
  return buf;
}
 5f8:	8d 65 f4             	lea    -0xc(%ebp),%esp
 5fb:	5b                   	pop    %ebx
 5fc:	5e                   	pop    %esi
 5fd:	5f                   	pop    %edi
 5fe:	5d                   	pop    %ebp
 5ff:	c3                   	ret    
  buf[i] = '\0';
 600:	8b 45 08             	mov    0x8(%ebp),%eax
 603:	89 de                	mov    %ebx,%esi
 605:	c6 04 30 00          	movb   $0x0,(%eax,%esi,1)
}
 609:	8d 65 f4             	lea    -0xc(%ebp),%esp
 60c:	5b                   	pop    %ebx
 60d:	5e                   	pop    %esi
 60e:	5f                   	pop    %edi
 60f:	5d                   	pop    %ebp
 610:	c3                   	ret    
 611:	8d b4 26 00 00 00 00 	lea    0x0(%esi,%eiz,1),%esi
 618:	8d b4 26 00 00 00 00 	lea    0x0(%esi,%eiz,1),%esi
 61f:	90                   	nop

00000620 <stat>:

int
stat(char *n, struct stat *st)
{
 620:	55                   	push   %ebp
 621:	89 e5                	mov    %esp,%ebp
 623:	56                   	push   %esi
 624:	53                   	push   %ebx
  int fd;
  int r;

  fd = open(n, O_RDONLY);
 625:	83 ec 08             	sub    $0x8,%esp
 628:	6a 00                	push   $0x0
 62a:	ff 75 08             	push   0x8(%ebp)
 62d:	e8 f1 00 00 00       	call   723 <open>
  if(fd < 0)
 632:	83 c4 10             	add    $0x10,%esp
 635:	85 c0                	test   %eax,%eax
 637:	78 27                	js     660 <stat+0x40>
    return -1;
  r = fstat(fd, st);
 639:	83 ec 08             	sub    $0x8,%esp
 63c:	ff 75 0c             	push   0xc(%ebp)
 63f:	89 c3                	mov    %eax,%ebx
 641:	50                   	push   %eax
 642:	e8 f4 00 00 00       	call   73b <fstat>
  close(fd);
 647:	89 1c 24             	mov    %ebx,(%esp)
  r = fstat(fd, st);
 64a:	89 c6                	mov    %eax,%esi
  close(fd);
 64c:	e8 ba 00 00 00       	call   70b <close>
  return r;
 651:	83 c4 10             	add    $0x10,%esp
}
 654:	8d 65 f8             	lea    -0x8(%ebp),%esp
 657:	89 f0                	mov    %esi,%eax
 659:	5b                   	pop    %ebx
 65a:	5e                   	pop    %esi
 65b:	5d                   	pop    %ebp
 65c:	c3                   	ret    
 65d:	8d 76 00             	lea    0x0(%esi),%esi
    return -1;
 660:	be ff ff ff ff       	mov    $0xffffffff,%esi
 665:	eb ed                	jmp    654 <stat+0x34>
 667:	8d b4 26 00 00 00 00 	lea    0x0(%esi,%eiz,1),%esi
 66e:	66 90                	xchg   %ax,%ax

00000670 <atoi>:

int
atoi(const char *s)
{
 670:	55                   	push   %ebp
 671:	89 e5                	mov    %esp,%ebp
 673:	53                   	push   %ebx
 674:	8b 55 08             	mov    0x8(%ebp),%edx
  int n;

  n = 0;
  while('0' <= *s && *s <= '9')
 677:	0f be 02             	movsbl (%edx),%eax
 67a:	8d 48 d0             	lea    -0x30(%eax),%ecx
 67d:	80 f9 09             	cmp    $0x9,%cl
  n = 0;
 680:	b9 00 00 00 00       	mov    $0x0,%ecx
  while('0' <= *s && *s <= '9')
 685:	77 1e                	ja     6a5 <atoi+0x35>
 687:	8d b4 26 00 00 00 00 	lea    0x0(%esi,%eiz,1),%esi
 68e:	66 90                	xchg   %ax,%ax
    n = n*10 + *s++ - '0';
 690:	83 c2 01             	add    $0x1,%edx
 693:	8d 0c 89             	lea    (%ecx,%ecx,4),%ecx
 696:	8d 4c 48 d0          	lea    -0x30(%eax,%ecx,2),%ecx
  while('0' <= *s && *s <= '9')
 69a:	0f be 02             	movsbl (%edx),%eax
 69d:	8d 58 d0             	lea    -0x30(%eax),%ebx
 6a0:	80 fb 09             	cmp    $0x9,%bl
 6a3:	76 eb                	jbe    690 <atoi+0x20>
  return n;
}
 6a5:	8b 5d fc             	mov    -0x4(%ebp),%ebx
 6a8:	89 c8                	mov    %ecx,%eax
 6aa:	c9                   	leave  
 6ab:	c3                   	ret    
 6ac:	8d 74 26 00          	lea    0x0(%esi,%eiz,1),%esi

000006b0 <memmove>:

void*
memmove(void *vdst, void *vsrc, int n)
{
 6b0:	55                   	push   %ebp
 6b1:	89 e5                	mov    %esp,%ebp
 6b3:	57                   	push   %edi
 6b4:	8b 45 10             	mov    0x10(%ebp),%eax
 6b7:	8b 55 08             	mov    0x8(%ebp),%edx
 6ba:	56                   	push   %esi
 6bb:	8b 75 0c             	mov    0xc(%ebp),%esi
  char *dst, *src;

  dst = vdst;
  src = vsrc;
  while(n-- > 0)
 6be:	85 c0                	test   %eax,%eax
 6c0:	7e 13                	jle    6d5 <memmove+0x25>
 6c2:	01 d0                	add    %edx,%eax
  dst = vdst;
 6c4:	89 d7                	mov    %edx,%edi
 6c6:	8d b4 26 00 00 00 00 	lea    0x0(%esi,%eiz,1),%esi
 6cd:	8d 76 00             	lea    0x0(%esi),%esi
    *dst++ = *src++;
 6d0:	a4                   	movsb  %ds:(%esi),%es:(%edi)
  while(n-- > 0)
 6d1:	39 f8                	cmp    %edi,%eax
 6d3:	75 fb                	jne    6d0 <memmove+0x20>
  return vdst;
}
 6d5:	5e                   	pop    %esi
 6d6:	89 d0                	mov    %edx,%eax
 6d8:	5f                   	pop    %edi
 6d9:	5d                   	pop    %ebp
 6da:	c3                   	ret    

000006db <fork>:
  name: \
    movl $SYS_ ## name, %eax; \
    int $T_SYSCALL; \
    ret

SYSCALL(fork)
 6db:	b8 01 00 00 00       	mov    $0x1,%eax
 6e0:	cd 40                	int    $0x40
 6e2:	c3                   	ret    

000006e3 <exit>:
SYSCALL(exit)
 6e3:	b8 02 00 00 00       	mov    $0x2,%eax
 6e8:	cd 40                	int    $0x40
 6ea:	c3                   	ret    

000006eb <wait>:
SYSCALL(wait)
 6eb:	b8 03 00 00 00       	mov    $0x3,%eax
 6f0:	cd 40                	int    $0x40
 6f2:	c3                   	ret    

000006f3 <pipe>:
SYSCALL(pipe)
 6f3:	b8 04 00 00 00       	mov    $0x4,%eax
 6f8:	cd 40                	int    $0x40
 6fa:	c3                   	ret    

000006fb <read>:
SYSCALL(read)
 6fb:	b8 05 00 00 00       	mov    $0x5,%eax
 700:	cd 40                	int    $0x40
 702:	c3                   	ret    

00000703 <write>:
SYSCALL(write)
 703:	b8 10 00 00 00       	mov    $0x10,%eax
 708:	cd 40                	int    $0x40
 70a:	c3                   	ret    

0000070b <close>:
SYSCALL(close)
 70b:	b8 15 00 00 00       	mov    $0x15,%eax
 710:	cd 40                	int    $0x40
 712:	c3                   	ret    

00000713 <kill>:
SYSCALL(kill)
 713:	b8 06 00 00 00       	mov    $0x6,%eax
 718:	cd 40                	int    $0x40
 71a:	c3                   	ret    

0000071b <exec>:
SYSCALL(exec)
 71b:	b8 07 00 00 00       	mov    $0x7,%eax
 720:	cd 40                	int    $0x40
 722:	c3                   	ret    

00000723 <open>:
SYSCALL(open)
 723:	b8 0f 00 00 00       	mov    $0xf,%eax
 728:	cd 40                	int    $0x40
 72a:	c3                   	ret    

0000072b <mknod>:
SYSCALL(mknod)
 72b:	b8 11 00 00 00       	mov    $0x11,%eax
 730:	cd 40                	int    $0x40
 732:	c3                   	ret    

00000733 <unlink>:
SYSCALL(unlink)
 733:	b8 12 00 00 00       	mov    $0x12,%eax
 738:	cd 40                	int    $0x40
 73a:	c3                   	ret    

0000073b <fstat>:
SYSCALL(fstat)
 73b:	b8 08 00 00 00       	mov    $0x8,%eax
 740:	cd 40                	int    $0x40
 742:	c3                   	ret    

00000743 <link>:
SYSCALL(link)
 743:	b8 13 00 00 00       	mov    $0x13,%eax
 748:	cd 40                	int    $0x40
 74a:	c3                   	ret    

0000074b <mkdir>:
SYSCALL(mkdir)
 74b:	b8 14 00 00 00       	mov    $0x14,%eax
 750:	cd 40                	int    $0x40
 752:	c3                   	ret    

00000753 <chdir>:
SYSCALL(chdir)
 753:	b8 09 00 00 00       	mov    $0x9,%eax
 758:	cd 40                	int    $0x40
 75a:	c3                   	ret    

0000075b <dup>:
SYSCALL(dup)
 75b:	b8 0a 00 00 00       	mov    $0xa,%eax
 760:	cd 40                	int    $0x40
 762:	c3                   	ret    

00000763 <getpid>:
SYSCALL(getpid)
 763:	b8 0b 00 00 00       	mov    $0xb,%eax
 768:	cd 40                	int    $0x40
 76a:	c3                   	ret    

0000076b <sbrk>:
SYSCALL(sbrk)
 76b:	b8 0c 00 00 00       	mov    $0xc,%eax
 770:	cd 40                	int    $0x40
 772:	c3                   	ret    

00000773 <sleep>:
SYSCALL(sleep)
 773:	b8 0d 00 00 00       	mov    $0xd,%eax
 778:	cd 40                	int    $0x40
 77a:	c3                   	ret    

0000077b <uptime>:
SYSCALL(uptime)
 77b:	b8 0e 00 00 00       	mov    $0xe,%eax
 780:	cd 40                	int    $0x40
 782:	c3                   	ret    

00000783 <shutdown>:
SYSCALL(shutdown)
 783:	b8 16 00 00 00       	mov    $0x16,%eax
 788:	cd 40                	int    $0x40
 78a:	c3                   	ret    

0000078b <set_quantum>:
SYSCALL(set_quantum)
 78b:	b8 19 00 00 00       	mov    $0x19,%eax
 790:	cd 40                	int    $0x40
 792:	c3                   	ret    

00000793 <set_priority>:
SYSCALL(set_priority)
 793:	b8 17 00 00 00       	mov    $0x17,%eax
 798:	cd 40                	int    $0x40
 79a:	c3                   	ret    

0000079b <enable_sched_display>:
SYSCALL(enable_sched_display)
 79b:	b8 18 00 00 00       	mov    $0x18,%eax
 7a0:	cd 40                	int    $0x40
 7a2:	c3                   	ret    

000007a3 <alloc_sem>:
SYSCALL(alloc_sem)
 7a3:	b8 1a 00 00 00       	mov    $0x1a,%eax
 7a8:	cd 40                	int    $0x40
 7aa:	c3                   	ret    

000007ab <wait_sem>:
SYSCALL(wait_sem)
 7ab:	b8 1b 00 00 00       	mov    $0x1b,%eax
 7b0:	cd 40                	int    $0x40
 7b2:	c3                   	ret    

000007b3 <signal_sem>:
SYSCALL(signal_sem)
 7b3:	b8 1c 00 00 00       	mov    $0x1c,%eax
 7b8:	cd 40                	int    $0x40
 7ba:	c3                   	ret    

000007bb <dealloc_sem>:
SYSCALL(dealloc_sem)
 7bb:	b8 1d 00 00 00       	mov    $0x1d,%eax
 7c0:	cd 40                	int    $0x40
 7c2:	c3                   	ret    
 7c3:	66 90                	xchg   %ax,%ax
 7c5:	66 90                	xchg   %ax,%ax
 7c7:	66 90                	xchg   %ax,%ax
 7c9:	66 90                	xchg   %ax,%ax
 7cb:	66 90                	xchg   %ax,%ax
 7cd:	66 90                	xchg   %ax,%ax
 7cf:	90                   	nop

000007d0 <printint>:
  write(fd, &c, 1);
}

static void
printint(int fd, int xx, int base, int sgn)
{
 7d0:	55                   	push   %ebp
 7d1:	89 e5                	mov    %esp,%ebp
 7d3:	57                   	push   %edi
 7d4:	56                   	push   %esi
 7d5:	53                   	push   %ebx
 7d6:	83 ec 3c             	sub    $0x3c,%esp
 7d9:	89 4d c4             	mov    %ecx,-0x3c(%ebp)
  uint x;

  neg = 0;
  if(sgn && xx < 0){
    neg = 1;
    x = -xx;
 7dc:	89 d1                	mov    %edx,%ecx
{
 7de:	89 45 b8             	mov    %eax,-0x48(%ebp)
  if(sgn && xx < 0){
 7e1:	85 d2                	test   %edx,%edx
 7e3:	0f 89 7f 00 00 00    	jns    868 <printint+0x98>
 7e9:	f6 45 08 01          	testb  $0x1,0x8(%ebp)
 7ed:	74 79                	je     868 <printint+0x98>
    neg = 1;
 7ef:	c7 45 bc 01 00 00 00 	movl   $0x1,-0x44(%ebp)
    x = -xx;
 7f6:	f7 d9                	neg    %ecx
  } else {
    x = xx;
  }

  i = 0;
 7f8:	31 db                	xor    %ebx,%ebx
 7fa:	8d 75 d7             	lea    -0x29(%ebp),%esi
 7fd:	8d 76 00             	lea    0x0(%esi),%esi
  do{
    buf[i++] = digits[x % base];
 800:	89 c8                	mov    %ecx,%eax
 802:	31 d2                	xor    %edx,%edx
 804:	89 cf                	mov    %ecx,%edi
 806:	f7 75 c4             	divl   -0x3c(%ebp)
 809:	0f b6 92 6c 0c 00 00 	movzbl 0xc6c(%edx),%edx
 810:	89 45 c0             	mov    %eax,-0x40(%ebp)
 813:	89 d8                	mov    %ebx,%eax
 815:	8d 5b 01             	lea    0x1(%ebx),%ebx
  }while((x /= base) != 0);
 818:	8b 4d c0             	mov    -0x40(%ebp),%ecx
    buf[i++] = digits[x % base];
 81b:	88 14 1e             	mov    %dl,(%esi,%ebx,1)
  }while((x /= base) != 0);
 81e:	39 7d c4             	cmp    %edi,-0x3c(%ebp)
 821:	76 dd                	jbe    800 <printint+0x30>
  if(neg)
 823:	8b 4d bc             	mov    -0x44(%ebp),%ecx
 826:	85 c9                	test   %ecx,%ecx
 828:	74 0c                	je     836 <printint+0x66>
    buf[i++] = '-';
 82a:	c6 44 1d d8 2d       	movb   $0x2d,-0x28(%ebp,%ebx,1)
    buf[i++] = digits[x % base];
 82f:	89 d8                	mov    %ebx,%eax
    buf[i++] = '-';
 831:	ba 2d 00 00 00       	mov    $0x2d,%edx

  while(--i >= 0)
 836:	8b 7d b8             	mov    -0x48(%ebp),%edi
 839:	8d 5c 05 d7          	lea    -0x29(%ebp,%eax,1),%ebx
 83d:	eb 07                	jmp    846 <printint+0x76>
 83f:	90                   	nop
    putc(fd, buf[i]);
 840:	0f b6 13             	movzbl (%ebx),%edx
 843:	83 eb 01             	sub    $0x1,%ebx
  write(fd, &c, 1);
 846:	83 ec 04             	sub    $0x4,%esp
 849:	88 55 d7             	mov    %dl,-0x29(%ebp)
 84c:	6a 01                	push   $0x1
 84e:	56                   	push   %esi
 84f:	57                   	push   %edi
 850:	e8 ae fe ff ff       	call   703 <write>
  while(--i >= 0)
 855:	83 c4 10             	add    $0x10,%esp
 858:	39 de                	cmp    %ebx,%esi
 85a:	75 e4                	jne    840 <printint+0x70>
}
 85c:	8d 65 f4             	lea    -0xc(%ebp),%esp
 85f:	5b                   	pop    %ebx
 860:	5e                   	pop    %esi
 861:	5f                   	pop    %edi
 862:	5d                   	pop    %ebp
 863:	c3                   	ret    
 864:	8d 74 26 00          	lea    0x0(%esi,%eiz,1),%esi
  neg = 0;
 868:	c7 45 bc 00 00 00 00 	movl   $0x0,-0x44(%ebp)
 86f:	eb 87                	jmp    7f8 <printint+0x28>
 871:	8d b4 26 00 00 00 00 	lea    0x0(%esi,%eiz,1),%esi
 878:	8d b4 26 00 00 00 00 	lea    0x0(%esi,%eiz,1),%esi
 87f:	90                   	nop

00000880 <printf>:

// Print to the given fd. Only understands %d, %x, %p, %s.
void
printf(int fd, char *fmt, ...)
{
 880:	55                   	push   %ebp
 881:	89 e5                	mov    %esp,%ebp
 883:	57                   	push   %edi
 884:	56                   	push   %esi
 885:	53                   	push   %ebx
 886:	83 ec 2c             	sub    $0x2c,%esp
  int c, i, state;
  uint *ap;

  state = 0;
  ap = (uint*)(void*)&fmt + 1;
  for(i = 0; fmt[i]; i++){
 889:	8b 5d 0c             	mov    0xc(%ebp),%ebx
{
 88c:	8b 75 08             	mov    0x8(%ebp),%esi
  for(i = 0; fmt[i]; i++){
 88f:	0f b6 13             	movzbl (%ebx),%edx
 892:	84 d2                	test   %dl,%dl
 894:	74 6a                	je     900 <printf+0x80>
  ap = (uint*)(void*)&fmt + 1;
 896:	8d 45 10             	lea    0x10(%ebp),%eax
 899:	83 c3 01             	add    $0x1,%ebx
  write(fd, &c, 1);
 89c:	8d 7d e7             	lea    -0x19(%ebp),%edi
  state = 0;
 89f:	31 c9                	xor    %ecx,%ecx
  ap = (uint*)(void*)&fmt + 1;
 8a1:	89 45 d0             	mov    %eax,-0x30(%ebp)
 8a4:	eb 36                	jmp    8dc <printf+0x5c>
 8a6:	8d b4 26 00 00 00 00 	lea    0x0(%esi,%eiz,1),%esi
 8ad:	8d 76 00             	lea    0x0(%esi),%esi
 8b0:	89 4d d4             	mov    %ecx,-0x2c(%ebp)
    c = fmt[i] & 0xff;
    if(state == 0){
      if(c == '%'){
        state = '%';
 8b3:	b9 25 00 00 00       	mov    $0x25,%ecx
      if(c == '%'){
 8b8:	83 f8 25             	cmp    $0x25,%eax
 8bb:	74 15                	je     8d2 <printf+0x52>
  write(fd, &c, 1);
 8bd:	83 ec 04             	sub    $0x4,%esp
 8c0:	88 55 e7             	mov    %dl,-0x19(%ebp)
 8c3:	6a 01                	push   $0x1
 8c5:	57                   	push   %edi
 8c6:	56                   	push   %esi
 8c7:	e8 37 fe ff ff       	call   703 <write>
 8cc:	8b 4d d4             	mov    -0x2c(%ebp),%ecx
      } else {
        putc(fd, c);
 8cf:	83 c4 10             	add    $0x10,%esp
  for(i = 0; fmt[i]; i++){
 8d2:	0f b6 13             	movzbl (%ebx),%edx
 8d5:	83 c3 01             	add    $0x1,%ebx
 8d8:	84 d2                	test   %dl,%dl
 8da:	74 24                	je     900 <printf+0x80>
    c = fmt[i] & 0xff;
 8dc:	0f b6 c2             	movzbl %dl,%eax
    if(state == 0){
 8df:	85 c9                	test   %ecx,%ecx
 8e1:	74 cd                	je     8b0 <printf+0x30>
      }
    } else if(state == '%'){
 8e3:	83 f9 25             	cmp    $0x25,%ecx
 8e6:	75 ea                	jne    8d2 <printf+0x52>
      if(c == 'd'){
 8e8:	83 f8 25             	cmp    $0x25,%eax
 8eb:	0f 84 07 01 00 00    	je     9f8 <printf+0x178>
 8f1:	83 e8 63             	sub    $0x63,%eax
 8f4:	83 f8 15             	cmp    $0x15,%eax
 8f7:	77 17                	ja     910 <printf+0x90>
 8f9:	ff 24 85 14 0c 00 00 	jmp    *0xc14(,%eax,4)
        putc(fd, c);
      }
      state = 0;
    }
  }
}
 900:	8d 65 f4             	lea    -0xc(%ebp),%esp
 903:	5b                   	pop    %ebx
 904:	5e                   	pop    %esi
 905:	5f                   	pop    %edi
 906:	5d                   	pop    %ebp
 907:	c3                   	ret    
 908:	8d b4 26 00 00 00 00 	lea    0x0(%esi,%eiz,1),%esi
 90f:	90                   	nop
  write(fd, &c, 1);
 910:	83 ec 04             	sub    $0x4,%esp
 913:	88 55 d4             	mov    %dl,-0x2c(%ebp)
 916:	6a 01                	push   $0x1
 918:	57                   	push   %edi
 919:	56                   	push   %esi
 91a:	c6 45 e7 25          	movb   $0x25,-0x19(%ebp)
 91e:	e8 e0 fd ff ff       	call   703 <write>
        putc(fd, c);
 923:	0f b6 55 d4          	movzbl -0x2c(%ebp),%edx
  write(fd, &c, 1);
 927:	83 c4 0c             	add    $0xc,%esp
 92a:	88 55 e7             	mov    %dl,-0x19(%ebp)
 92d:	6a 01                	push   $0x1
 92f:	57                   	push   %edi
 930:	56                   	push   %esi
 931:	e8 cd fd ff ff       	call   703 <write>
        putc(fd, c);
 936:	83 c4 10             	add    $0x10,%esp
      state = 0;
 939:	31 c9                	xor    %ecx,%ecx
 93b:	eb 95                	jmp    8d2 <printf+0x52>
 93d:	8d 76 00             	lea    0x0(%esi),%esi
        printint(fd, *ap, 16, 0);
 940:	83 ec 0c             	sub    $0xc,%esp
 943:	b9 10 00 00 00       	mov    $0x10,%ecx
 948:	6a 00                	push   $0x0
 94a:	8b 45 d0             	mov    -0x30(%ebp),%eax
 94d:	8b 10                	mov    (%eax),%edx
 94f:	89 f0                	mov    %esi,%eax
 951:	e8 7a fe ff ff       	call   7d0 <printint>
        ap++;
 956:	83 45 d0 04          	addl   $0x4,-0x30(%ebp)
 95a:	83 c4 10             	add    $0x10,%esp
      state = 0;
 95d:	31 c9                	xor    %ecx,%ecx
 95f:	e9 6e ff ff ff       	jmp    8d2 <printf+0x52>
 964:	8d 74 26 00          	lea    0x0(%esi,%eiz,1),%esi
        s = (char*)*ap;
 968:	8b 45 d0             	mov    -0x30(%ebp),%eax
 96b:	8b 10                	mov    (%eax),%edx
        ap++;
 96d:	83 c0 04             	add    $0x4,%eax
 970:	89 45 d0             	mov    %eax,-0x30(%ebp)
        if(s == 0)
 973:	85 d2                	test   %edx,%edx
 975:	0f 84 8d 00 00 00    	je     a08 <printf+0x188>
        while(*s != 0){
 97b:	0f b6 02             	movzbl (%edx),%eax
      state = 0;
 97e:	31 c9                	xor    %ecx,%ecx
        while(*s != 0){
 980:	84 c0                	test   %al,%al
 982:	0f 84 4a ff ff ff    	je     8d2 <printf+0x52>
 988:	89 5d d4             	mov    %ebx,-0x2c(%ebp)
 98b:	89 d3                	mov    %edx,%ebx
 98d:	8d 76 00             	lea    0x0(%esi),%esi
  write(fd, &c, 1);
 990:	83 ec 04             	sub    $0x4,%esp
          s++;
 993:	83 c3 01             	add    $0x1,%ebx
 996:	88 45 e7             	mov    %al,-0x19(%ebp)
  write(fd, &c, 1);
 999:	6a 01                	push   $0x1
 99b:	57                   	push   %edi
 99c:	56                   	push   %esi
 99d:	e8 61 fd ff ff       	call   703 <write>
        while(*s != 0){
 9a2:	0f b6 03             	movzbl (%ebx),%eax
 9a5:	83 c4 10             	add    $0x10,%esp
 9a8:	84 c0                	test   %al,%al
 9aa:	75 e4                	jne    990 <printf+0x110>
      state = 0;
 9ac:	8b 5d d4             	mov    -0x2c(%ebp),%ebx
 9af:	31 c9                	xor    %ecx,%ecx
 9b1:	e9 1c ff ff ff       	jmp    8d2 <printf+0x52>
 9b6:	8d b4 26 00 00 00 00 	lea    0x0(%esi,%eiz,1),%esi
 9bd:	8d 76 00             	lea    0x0(%esi),%esi
        printint(fd, *ap, 10, 1);
 9c0:	83 ec 0c             	sub    $0xc,%esp
 9c3:	b9 0a 00 00 00       	mov    $0xa,%ecx
 9c8:	6a 01                	push   $0x1
 9ca:	e9 7b ff ff ff       	jmp    94a <printf+0xca>
 9cf:	90                   	nop
        putc(fd, *ap);
 9d0:	8b 45 d0             	mov    -0x30(%ebp),%eax
  write(fd, &c, 1);
 9d3:	83 ec 04             	sub    $0x4,%esp
        putc(fd, *ap);
 9d6:	8b 00                	mov    (%eax),%eax
  write(fd, &c, 1);
 9d8:	6a 01                	push   $0x1
 9da:	57                   	push   %edi
 9db:	56                   	push   %esi
        putc(fd, *ap);
 9dc:	88 45 e7             	mov    %al,-0x19(%ebp)
  write(fd, &c, 1);
 9df:	e8 1f fd ff ff       	call   703 <write>
        ap++;
 9e4:	83 45 d0 04          	addl   $0x4,-0x30(%ebp)
 9e8:	83 c4 10             	add    $0x10,%esp
      state = 0;
 9eb:	31 c9                	xor    %ecx,%ecx
 9ed:	e9 e0 fe ff ff       	jmp    8d2 <printf+0x52>
 9f2:	8d b6 00 00 00 00    	lea    0x0(%esi),%esi
        putc(fd, c);
 9f8:	88 55 e7             	mov    %dl,-0x19(%ebp)
  write(fd, &c, 1);
 9fb:	83 ec 04             	sub    $0x4,%esp
 9fe:	e9 2a ff ff ff       	jmp    92d <printf+0xad>
 a03:	8d 74 26 00          	lea    0x0(%esi,%eiz,1),%esi
 a07:	90                   	nop
          s = "(null)";
 a08:	ba 0a 0c 00 00       	mov    $0xc0a,%edx
        while(*s != 0){
 a0d:	89 5d d4             	mov    %ebx,-0x2c(%ebp)
 a10:	b8 28 00 00 00       	mov    $0x28,%eax
 a15:	89 d3                	mov    %edx,%ebx
 a17:	e9 74 ff ff ff       	jmp    990 <printf+0x110>
 a1c:	66 90                	xchg   %ax,%ax
 a1e:	66 90                	xchg   %ax,%ax

00000a20 <free>:
static Header base;
static Header *freep;

void
free(void *ap)
{
 a20:	55                   	push   %ebp
  Header *bp, *p;

  bp = (Header*)ap - 1;
  for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
 a21:	a1 74 0f 00 00       	mov    0xf74,%eax
{
 a26:	89 e5                	mov    %esp,%ebp
 a28:	57                   	push   %edi
 a29:	56                   	push   %esi
 a2a:	53                   	push   %ebx
 a2b:	8b 5d 08             	mov    0x8(%ebp),%ebx
  bp = (Header*)ap - 1;
 a2e:	8d 4b f8             	lea    -0x8(%ebx),%ecx
  for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
 a31:	8d b4 26 00 00 00 00 	lea    0x0(%esi,%eiz,1),%esi
 a38:	89 c2                	mov    %eax,%edx
 a3a:	8b 00                	mov    (%eax),%eax
 a3c:	39 ca                	cmp    %ecx,%edx
 a3e:	73 30                	jae    a70 <free+0x50>
 a40:	39 c1                	cmp    %eax,%ecx
 a42:	72 04                	jb     a48 <free+0x28>
    if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
 a44:	39 c2                	cmp    %eax,%edx
 a46:	72 f0                	jb     a38 <free+0x18>
      break;
  if(bp + bp->s.size == p->s.ptr){
 a48:	8b 73 fc             	mov    -0x4(%ebx),%esi
 a4b:	8d 3c f1             	lea    (%ecx,%esi,8),%edi
 a4e:	39 f8                	cmp    %edi,%eax
 a50:	74 30                	je     a82 <free+0x62>
    bp->s.size += p->s.ptr->s.size;
    bp->s.ptr = p->s.ptr->s.ptr;
 a52:	89 43 f8             	mov    %eax,-0x8(%ebx)
  } else
    bp->s.ptr = p->s.ptr;
  if(p + p->s.size == bp){
 a55:	8b 42 04             	mov    0x4(%edx),%eax
 a58:	8d 34 c2             	lea    (%edx,%eax,8),%esi
 a5b:	39 f1                	cmp    %esi,%ecx
 a5d:	74 3a                	je     a99 <free+0x79>
    p->s.size += bp->s.size;
    p->s.ptr = bp->s.ptr;
 a5f:	89 0a                	mov    %ecx,(%edx)
  } else
    p->s.ptr = bp;
  freep = p;
}
 a61:	5b                   	pop    %ebx
  freep = p;
 a62:	89 15 74 0f 00 00    	mov    %edx,0xf74
}
 a68:	5e                   	pop    %esi
 a69:	5f                   	pop    %edi
 a6a:	5d                   	pop    %ebp
 a6b:	c3                   	ret    
 a6c:	8d 74 26 00          	lea    0x0(%esi,%eiz,1),%esi
    if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
 a70:	39 c2                	cmp    %eax,%edx
 a72:	72 c4                	jb     a38 <free+0x18>
 a74:	39 c1                	cmp    %eax,%ecx
 a76:	73 c0                	jae    a38 <free+0x18>
  if(bp + bp->s.size == p->s.ptr){
 a78:	8b 73 fc             	mov    -0x4(%ebx),%esi
 a7b:	8d 3c f1             	lea    (%ecx,%esi,8),%edi
 a7e:	39 f8                	cmp    %edi,%eax
 a80:	75 d0                	jne    a52 <free+0x32>
    bp->s.size += p->s.ptr->s.size;
 a82:	03 70 04             	add    0x4(%eax),%esi
 a85:	89 73 fc             	mov    %esi,-0x4(%ebx)
    bp->s.ptr = p->s.ptr->s.ptr;
 a88:	8b 02                	mov    (%edx),%eax
 a8a:	8b 00                	mov    (%eax),%eax
 a8c:	89 43 f8             	mov    %eax,-0x8(%ebx)
  if(p + p->s.size == bp){
 a8f:	8b 42 04             	mov    0x4(%edx),%eax
 a92:	8d 34 c2             	lea    (%edx,%eax,8),%esi
 a95:	39 f1                	cmp    %esi,%ecx
 a97:	75 c6                	jne    a5f <free+0x3f>
    p->s.size += bp->s.size;
 a99:	03 43 fc             	add    -0x4(%ebx),%eax
  freep = p;
 a9c:	89 15 74 0f 00 00    	mov    %edx,0xf74
    p->s.size += bp->s.size;
 aa2:	89 42 04             	mov    %eax,0x4(%edx)
    p->s.ptr = bp->s.ptr;
 aa5:	8b 4b f8             	mov    -0x8(%ebx),%ecx
 aa8:	89 0a                	mov    %ecx,(%edx)
}
 aaa:	5b                   	pop    %ebx
 aab:	5e                   	pop    %esi
 aac:	5f                   	pop    %edi
 aad:	5d                   	pop    %ebp
 aae:	c3                   	ret    
 aaf:	90                   	nop

00000ab0 <malloc>:
  return freep;
}

void*
malloc(uint nbytes)
{
 ab0:	55                   	push   %ebp
 ab1:	89 e5                	mov    %esp,%ebp
 ab3:	57                   	push   %edi
 ab4:	56                   	push   %esi
 ab5:	53                   	push   %ebx
 ab6:	83 ec 1c             	sub    $0x1c,%esp
  Header *p, *prevp;
  uint nunits;

  nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
 ab9:	8b 45 08             	mov    0x8(%ebp),%eax
  if((prevp = freep) == 0){
 abc:	8b 3d 74 0f 00 00    	mov    0xf74,%edi
  nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
 ac2:	8d 70 07             	lea    0x7(%eax),%esi
 ac5:	c1 ee 03             	shr    $0x3,%esi
 ac8:	83 c6 01             	add    $0x1,%esi
  if((prevp = freep) == 0){
 acb:	85 ff                	test   %edi,%edi
 acd:	0f 84 9d 00 00 00    	je     b70 <malloc+0xc0>
    base.s.ptr = freep = prevp = &base;
    base.s.size = 0;
  }
  for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
 ad3:	8b 17                	mov    (%edi),%edx
    if(p->s.size >= nunits){
 ad5:	8b 4a 04             	mov    0x4(%edx),%ecx
 ad8:	39 f1                	cmp    %esi,%ecx
 ada:	73 6a                	jae    b46 <malloc+0x96>
 adc:	bb 00 10 00 00       	mov    $0x1000,%ebx
 ae1:	39 de                	cmp    %ebx,%esi
 ae3:	0f 43 de             	cmovae %esi,%ebx
  p = sbrk(nu * sizeof(Header));
 ae6:	8d 04 dd 00 00 00 00 	lea    0x0(,%ebx,8),%eax
 aed:	89 45 e4             	mov    %eax,-0x1c(%ebp)
 af0:	eb 17                	jmp    b09 <malloc+0x59>
 af2:	8d b6 00 00 00 00    	lea    0x0(%esi),%esi
  for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
 af8:	8b 02                	mov    (%edx),%eax
    if(p->s.size >= nunits){
 afa:	8b 48 04             	mov    0x4(%eax),%ecx
 afd:	39 f1                	cmp    %esi,%ecx
 aff:	73 4f                	jae    b50 <malloc+0xa0>
        p->s.size = nunits;
      }
      freep = prevp;
      return (void*)(p + 1);
    }
    if(p == freep)
 b01:	8b 3d 74 0f 00 00    	mov    0xf74,%edi
 b07:	89 c2                	mov    %eax,%edx
 b09:	39 d7                	cmp    %edx,%edi
 b0b:	75 eb                	jne    af8 <malloc+0x48>
  p = sbrk(nu * sizeof(Header));
 b0d:	83 ec 0c             	sub    $0xc,%esp
 b10:	ff 75 e4             	push   -0x1c(%ebp)
 b13:	e8 53 fc ff ff       	call   76b <sbrk>
  if(p == (char*)-1)
 b18:	83 c4 10             	add    $0x10,%esp
 b1b:	83 f8 ff             	cmp    $0xffffffff,%eax
 b1e:	74 1c                	je     b3c <malloc+0x8c>
  hp->s.size = nu;
 b20:	89 58 04             	mov    %ebx,0x4(%eax)
  free((void*)(hp + 1));
 b23:	83 ec 0c             	sub    $0xc,%esp
 b26:	83 c0 08             	add    $0x8,%eax
 b29:	50                   	push   %eax
 b2a:	e8 f1 fe ff ff       	call   a20 <free>
  return freep;
 b2f:	8b 15 74 0f 00 00    	mov    0xf74,%edx
      if((p = morecore(nunits)) == 0)
 b35:	83 c4 10             	add    $0x10,%esp
 b38:	85 d2                	test   %edx,%edx
 b3a:	75 bc                	jne    af8 <malloc+0x48>
        return 0;
  }
}
 b3c:	8d 65 f4             	lea    -0xc(%ebp),%esp
        return 0;
 b3f:	31 c0                	xor    %eax,%eax
}
 b41:	5b                   	pop    %ebx
 b42:	5e                   	pop    %esi
 b43:	5f                   	pop    %edi
 b44:	5d                   	pop    %ebp
 b45:	c3                   	ret    
    if(p->s.size >= nunits){
 b46:	89 d0                	mov    %edx,%eax
 b48:	89 fa                	mov    %edi,%edx
 b4a:	8d b6 00 00 00 00    	lea    0x0(%esi),%esi
      if(p->s.size == nunits)
 b50:	39 ce                	cmp    %ecx,%esi
 b52:	74 4c                	je     ba0 <malloc+0xf0>
        p->s.size -= nunits;
 b54:	29 f1                	sub    %esi,%ecx
 b56:	89 48 04             	mov    %ecx,0x4(%eax)
        p += p->s.size;
 b59:	8d 04 c8             	lea    (%eax,%ecx,8),%eax
        p->s.size = nunits;
 b5c:	89 70 04             	mov    %esi,0x4(%eax)
      freep = prevp;
 b5f:	89 15 74 0f 00 00    	mov    %edx,0xf74
}
 b65:	8d 65 f4             	lea    -0xc(%ebp),%esp
      return (void*)(p + 1);
 b68:	83 c0 08             	add    $0x8,%eax
}
 b6b:	5b                   	pop    %ebx
 b6c:	5e                   	pop    %esi
 b6d:	5f                   	pop    %edi
 b6e:	5d                   	pop    %ebp
 b6f:	c3                   	ret    
    base.s.ptr = freep = prevp = &base;
 b70:	c7 05 74 0f 00 00 78 	movl   $0xf78,0xf74
 b77:	0f 00 00 
    base.s.size = 0;
 b7a:	bf 78 0f 00 00       	mov    $0xf78,%edi
    base.s.ptr = freep = prevp = &base;
 b7f:	c7 05 78 0f 00 00 78 	movl   $0xf78,0xf78
 b86:	0f 00 00 
  for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
 b89:	89 fa                	mov    %edi,%edx
    base.s.size = 0;
 b8b:	c7 05 7c 0f 00 00 00 	movl   $0x0,0xf7c
 b92:	00 00 00 
    if(p->s.size >= nunits){
 b95:	e9 42 ff ff ff       	jmp    adc <malloc+0x2c>
 b9a:	8d b6 00 00 00 00    	lea    0x0(%esi),%esi
        prevp->s.ptr = p->s.ptr;
 ba0:	8b 08                	mov    (%eax),%ecx
 ba2:	89 0a                	mov    %ecx,(%edx)
 ba4:	eb b9                	jmp    b5f <malloc+0xaf>
